//
//  DetailTableViewCell.m
//  SuperNews
//
//  Created by dllo on 16/1/14.
//  Copyright © 2016年 qiang. All rights reserved.
//

#import "DetailTableViewCell.h"

@implementation DetailTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews
{
    self.backgroundColor = [UIColor whiteColor];
    self.imageV = [[UIImageView alloc] init];
    self.imageV.layer.cornerRadius = 35;
    self.imageV.layer.masksToBounds = YES;
    [self.contentView addSubview:self.imageV];
    
    self.titleLabel = [[UILabel alloc] init];
    self.titleLabel.font = [UIFont systemFontOfSize:18.0];
    [self.contentView addSubview:self.titleLabel];
    
    self.detailLabel = [[UILabel alloc] init];
    self.detailLabel.numberOfLines = 0;
    self.detailLabel.font = [UIFont systemFontOfSize:11.0];
    self.detailLabel.textColor = [UIColor colorWithRed:0.4372 green:0.4372 blue:0.4372 alpha:1.0];
    [self.contentView addSubview:self.detailLabel];
    
    self.imageVGo = [[UIImageView alloc] init];
    self.imageVGo.image = [UIImage imageNamed:@"audionews_index_play"];
    [self.imageV addSubview:self.imageVGo];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imageV.frame = CGRectMake(10, 5, 70, 70);
    self.titleLabel.frame = CGRectMake(90, 5, [UIScreen mainScreen].bounds.size.width - 100, 30);
    self.detailLabel.frame = CGRectMake(90, 35, [UIScreen mainScreen].bounds.size.width - 100, 40);
    self.imageVGo.frame = CGRectMake(20, 20, 30, 30);
}

@end
